Creating users with DXL

Hello,

1. Creating users in DOORS database via DXL coding.. am trying this with the method "addUser(sUserName, sUserLogin)". I could only able to pass Username and System username. I wanted to pass Group name also in this method. Is it possible to add group name in this method additionally. If yes, please give me some idea as i am new to DXL.

2. Is it possible to get the existing DOORS groups via DXL coding?

Thanks in advance,
Muthurani M
muthurani - Tue Sep 21 11:25:06 EDT 2010

Re: Creating users with DXL
PDU - Tue Sep 21 12:30:14 EDT 2010

Hi,

1.
try addGroup, addUser, and addMember(Group group,User user)
2.
example to list alls users by group :

for groupe in groupList  do
  {
      if (member(groupe, user))
      {
          .........
       }
  }

 


Pierre

 

Re: Creating users with DXL
llandale - Wed Sep 22 16:19:05 EDT 2010

You need to first create the user, then fill in the rest of the info and add to any groups.

Re: Creating users with DXL
MikeHoek - Mon Dec 05 13:45:51 EST 2011

llandale - Wed Sep 22 16:19:05 EDT 2010
You need to first create the user, then fill in the rest of the info and add to any groups.

Hello,

Were you able to successfully accomplish loading your users and assigning them to groups?

We have a long list of users and would like to do the same...would you be willing to post your DXL for doing this?

Thanks!
Mike

Re: Creating users with DXL
llandale - Mon Dec 05 14:03:54 EST 2011

MikeHoek - Mon Dec 05 13:45:51 EST 2011
Hello,

Were you able to successfully accomplish loading your users and assigning them to groups?

We have a long list of users and would like to do the same...would you be willing to post your DXL for doing this?

Thanks!
Mike

Ignoring how you'd have your DXL read the file, the structure would look like this:

for every user I want to create
{  usr = create the user
   add user properties, such as email
   for every NameGroup I want this user to belong
   {  grp = find(NameGroup)
      addMember(grp, usr)
   }
}


-Louie

Re: Creating users with DXL
kbmurphy - Mon Dec 05 15:41:24 EST 2011

llandale - Mon Dec 05 14:03:54 EST 2011

Ignoring how you'd have your DXL read the file, the structure would look like this:

for every user I want to create
{  usr = create the user
   add user properties, such as email
   for every NameGroup I want this user to belong
   {  grp = find(NameGroup)
      addMember(grp, usr)
   }
}


-Louie

Can't just create the users, Lou. You have to issue a saveDirectory(), otherwise the changes won't stick.